package com.java.controller;

import com.java.config.result.Result;
import com.java.model.vo.DepartmentVo;
import com.java.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/admin/hosp/department")
public class DepartmentController {

    @Autowired
    private DepartmentService departmentService;


    @GetMapping("/getDeptList/{hoscode}")
    public Result getDeptList(@PathVariable String hoscode){
        List<DepartmentVo> result =  departmentService.findByHoscode(hoscode);
        return Result.ok(result);
    }

}
